package com.dy.design_pattern_study.the_facade_pattern.dome2;

import com.dy.design_pattern_study.the_facade_pattern.dome2.systemClass.SubSytemFour;
import com.dy.design_pattern_study.the_facade_pattern.dome2.systemClass.SubSytemOne;
import com.dy.design_pattern_study.the_facade_pattern.dome2.systemClass.SubSytemThree;
import com.dy.design_pattern_study.the_facade_pattern.dome2.systemClass.SubSytemTwo;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-03-27
 * @Content 外观模式（门面模式）
 */
public class Facade {
    SubSytemOne one;
    SubSytemTwo two;
    SubSytemThree three;
    SubSytemFour four;

    public Facade(){
        one = new SubSytemOne();
        two = new SubSytemTwo();
        three = new SubSytemThree();
        four = new SubSytemFour();
    }

    public void methodA(){
        System.out.println("方法组A");
        one.methodOne();
        two.methodTwo();
        three.methodThree();
    }

    public void methodB(){
        System.out.println("方法组B");
        three.methodThree();
        four.methodFour();
    }

}
